#include "def.h"

int main(){
	char filename[50] = "F:\\CS\\C++\\mySuduku\\I_O files\\test\\";
	char temp[50];
	char suffix1[20] = ".cnf";
	char suffix2[20] = ".res";
	char temp2;
	int rand = 0,cut = 0;
	int op = 3;
	int RvW;
	const int filename_len = strlen(filename);
	char WA[5] = "WA";
	char AC[5] = "AC";
	char filename2[50] = "F:\\CS\\C++\\mySuduku\\suduku\\suduku.cnf";
	printf("Menu\n0:exit	1:solve sat	2:suduku 3:X-suduku\n");
	
	while (op) {
		printf("please input your choice\n");
		scanf("%d",&op);
		if (op == 0) {
			exit(0);
		}
		switch (op) {
		case 1:
			printf("please input the name of the file\n");
			scanf("%s", temp);
			strcat(filename, temp);
			printf("ready to use dpll on file %s\ndo you want to proceed?\n", filename);
			printf("print 1 to go on,print 2 to quit\n");
			scanf("%d", &rand);
			if (rand == 2) {
				return 0;
			}
			judge(filename, suffix1, suffix2);
			filename[filename_len] = '\0';
			break;
		case 2:
			play();
			break;
		case 3:
			playX();
			break;
		default:
			printf("wrong option!\n");
			break;
		}
	}
	

	return 0;
}